package com.maxlen.goods.entity.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.maxlen.goods.entity.CategoryEntity;
import lombok.Data;

import java.util.List;

@Data
public class CategoryDTO extends CategoryEntity {
    /**
     * 子分类
     */
    // 设置此字段为空时不写入 json
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<CategoryDTO> children;
}
